<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCompaniesTable extends Migration
{
	public function up()
	{
		Schema::create('companies', function(Blueprint $table) {
            $table->increments('id');
            $table->integer('area_id')->unsigned()->index()->comment('区域ID');
            $table->string('name')->index()->comment('商家名');
            $table->string('logo')->nullable()->comment('logo 图片');
            $table->text('introduction')->nullable()->comment('简介');
            $table->string('remark')->nullable()->comment('备注');
            $table->integer('ordernum')->default(0)->comment('排序序号');
            $table->boolean('forbidden')->default(false)->comment('禁用标志');
            $table->boolean('delflag')->default(false)->comment('删除标志');
            $table->timestamps();
        });
	}

	public function down()
	{
		Schema::drop('companies');
	}
}
